from abc import ABC, abstractmethod

class ISerializer(ABC):
    def __init__(self, writer, encoding):
        self.__writer = writer
        self.__encoding = encoding

    def encoding(self):
        return self.__encoding

    def writer(self):
        return self.__writer

    @abstractmethod
    def serialize(self, v):
        pass

    @abstractmethod
    def serialize_pair(self, key, value):
        pass

    @abstractmethod
    def serialize_none(self):
        pass

    @abstractmethod
    def serialize_pair_separator(self):
        pass
    @abstractmethod
    def serialize_key(self, key):
        pass
    @abstractmethod
    def serialize_key_value_separator(self):
        pass
    @abstractmethod
    def serialize_value(self, v):
        pass
    
    @abstractmethod
    def serialize_bool(self, v):
        pass

    @abstractmethod
    def serialize_str(self, v):
        pass
    @abstractmethod
    def serialize_bytes(self, v):
        pass

    @abstractmethod
    def serialize_int(self, v):
        pass

    @abstractmethod
    def serialize_float(self, v):
        pass

    @abstractmethod
    def serialize_map_start(self):
        pass
    @abstractmethod
    def serialize_map_end(self):
        pass
    @abstractmethod
    def serialize_map(self, v):
        pass

    @abstractmethod
    def serialize_list_start(self):
        pass
    @abstractmethod
    def serialize_list_end(self):
        pass
    @abstractmethod
    def serialize_list(self, v):
        pass
